package com.lap.generator.infrastructure.query;

import com.lap.generator.config.model.JdbcInfo;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DataSourceFactory {

  private DataSourceFactory() {}

  public static Connection resolver(JdbcInfo jdbcInfo) throws SQLException {
    return DriverManager.getConnection(
        jdbcInfo.getUrl(), jdbcInfo.getUsername(), jdbcInfo.getPassword());
  }
}
